package com.roadmap.ajax.handler;

import org.apache.log4j.Logger;

import com.roadmap.client.module.user.ActRecorder;
import com.roadmap.client.module.user.IActRecorder;
import com.roadmap.common.RdcLogger;

@Deprecated
public class BehavHandler {
	private final static Logger logger = RdcLogger.getLogger(BehavHandler.class);
	private IActRecorder behavMgr;
	
	private IActRecorder getManager(String aspirantId) {
		if (behavMgr == null) {
			behavMgr = new ActRecorder(aspirantId);
		}
		return behavMgr;
	}
	
	public boolean deleteBehav(String aspirantId, String behavId){
		try {
			getManager(aspirantId).delete(behavId);
			return true;
		}
		catch (Exception e){
			logger.error("failed to delete the activity record " + behavId, e);
		}
		return false;
	}
}
